package com.aegean.MonitorExamSYS.center.action;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.aegean.MonitorExamSYS.center.business.CenterBusiness;
import com.opensymphony.xwork2.ActionSupport;
@Controller("DeleteSmallTypeAction")
@Scope("prototype")
public class DeleteSmallType extends ActionSupport{
	@Resource
	CenterBusiness business;
	private int[] small_Ids;
	private boolean success;
	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public int[] getSmall_Ids() {
		return small_Ids;
	}

	public void setSmall_Ids(int[] small_Ids) {
		this.small_Ids = small_Ids;
	}

	public String delete()throws java.sql.BatchUpdateException{
		try {
			success = business.deleteSmallType(small_Ids);
			return SUCCESS;
		} catch (Exception e) {
			e.printStackTrace();
			return SUCCESS;
		}
	}
	

}
